// filename: ISocketEngine.h
// author: enic
// date: 2015-06-26

#pragma once

#include "IAsyncTcpSocket.h"
#include "IAsyncTcpAcceptor.h"

class ISocketEngine
{
public:
	virtual ~ISocketEngine() {}

public:
	virtual bool Start() = 0;
	virtual void Stop() = 0;
	virtual IAsyncTcpSocket* CreateAsyncTcpSocket() = 0;
	virtual void ReleaseAsyncTcpSocket(IAsyncTcpSocket* pSocket) = 0;
	virtual IAsyncTcpAcceptor* CreateAsyncTcpAcceptor() = 0;
	virtual void ReleaseAsyncTcpAcceptor(IAsyncTcpAcceptor* pAcceptor) = 0;
};


ISocketEngine* CreateSocketEngine();
void ReleaseSocketEngine(ISocketEngine* pSocketEngine);